package com.colabo.j2ee.web.oaf.security.model;

import org.springframework.security.core.GrantedAuthority;

import com.colabo.j2ee.web.core.vo.RecordObject;


public class ResourceAuthorityModel implements GrantedAuthority {
	private static final long serialVersionUID = -7381331647104794349L;
	private RecordObject valueObject;

	public ResourceAuthorityModel(RecordObject valueObject) {
		this.valueObject = valueObject;
	}

	public String getAuthority() {
		if (valueObject != null) {
			return valueObject.getLogicalKey();
		}
		return "";
	}

	public RecordObject getResource() {
		return valueObject;
	}
}
